<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWxWorkChatDataPullLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_work_chat_data_pull_logs', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('min_seq')->default(0)->comment('本次拉取的最小seq值');
            $table->unsignedBigInteger('max_seq')->default(0)->comment('本次拉取的最大seq值');
            $table->longText('res')->nullable()->comment('拉取结果，json格式');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `wx_work_chat_data_pull_logs` comment '企业微信会话内容拉取记录'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_work_chat_data_pull_logs');
    }
}
